package com.atguigu.gulimall.order.controller;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.entity.TestOrder;
import com.atguigu.gulimall.order.service.TestOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
  *@Dsecriiption TODO
  *@Author liwang
  *@version 2022/9/3、17:22
**/
@RestController
@RequestMapping("/v1/order")
public class TestOrderController {

    @Autowired
    TestOrderService testOrderService;

    @RequestMapping(method = RequestMethod.POST)
    R testOrder(@RequestBody TestOrder testOrder){
        testOrderService.insert(testOrder);
      return R.ok();
    }


}
